home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / internet / tcp / amitcp / amitcp-api-22.lha / AmiTCP-2.2 / netinclude / clib / socket_inlines.h next >
Encoding:
C/C++ Source or Header  |  1993-08-12  |  1.2 KB  |  53 lines

  1. #ifndef CLIB_SOCKET_INLINES_H
  2. #define CLIB_SOCKET_INLINES_H
  3.  
  4. /*
  5.  * $Id: socket_inlines.h,v 1.1 1993/07/07 15:23:57 too Exp $
  6.  *
  7.  * Copyright © 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
  8.  *                  Helsinki University of Technology, Finland.
  9.  *                  All rights reserved.
  10.  *
  11.  * Some inlines to replace stubs for compilers that can handle inlines.
  12.  * This file is for AmiTCP/IP bsdsocket.library
  13.  *
  14.  * HISTORY
  15.  * $Log: socket_inlines.h,v $
  16.  * Revision 1.1  1993/07/07  15:23:57  too
  17.  * Initial revision
  18.  *
  19.  */
  20.  
  21. static __inline LONG
  22.   select(LONG nfds, fd_set *readfds, fd_set *writefds, fd_set *exeptfds,
  23.      struct timeval *timeout)
  24. {
  25.   /* call WaitSelect with NULL signal mask pointer */
  26.   return WaitSelect(nfds, readfds, writefds, exeptfds, timeout, NULL);
  27. }
  28.  
  29. static __inline char *
  30.   inet_ntoa(struct in_addr addr) 
  31. {
  32.   return Inet_NtoA(addr.s_addr);
  33. }
  34. static __inline struct in_addr
  35.   inet_makeaddr(int net, int host)
  36. {
  37.   struct in_addr addr;
  38.   addr.s_addr = Inet_MakeAddr(net, host);
  39.   return addr;
  40. }
  41. static __inline unsigned long
  42.   inet_lnaof(struct in_addr addr) 
  43. {
  44.   return Inet_LnaOf(addr.s_addr);
  45. }
  46. static __inline unsigned long
  47.   inet_netof(struct in_addr addr)
  48. {
  49.   return Inet_NetOf(addr.s_addr);
  50. }
  51.  
  52. #endif /* CLIB_SOCKET_INLINES_H */
  53.